package com.training.spring.service;


import com.training.spring.mapper.MessageMapper;
import com.training.spring.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    MessageMapper messageMapper;
    public void insertMessage(MessageInfo messageInfo){
        messageMapper.insertMessage(messageInfo);
    }
    public List<MessageInfo> getMessage(){
        return messageMapper.getMessage();
    }
}
